﻿using System.Collections.Generic;
using System.ComponentModel;
using System.Web.Services;
using KPIS.GERP.GFMS.IBLL;
using KPIS.GERP.GFMS.BLL;
using KPIS.GERP.GFMS.MODEL;
using System;

namespace KPIS.GERP.GFMS.SERVICE
{
    /// <summary>
    /// Summary description for FIM_MoneyReturns
    /// </summary>
    [WebService(Namespace = "http://tempuri.org/")]
    [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
    [ToolboxItem(false)]
    // To allow this Web Service to be called from script, using ASP.NET AJAX, uncomment the following line. 
    // [System.Web.Script.Services.ScriptService]
    public class FIM_MoneyReturns : System.Web.Services.WebService
    {
        IBLL_FIM_MoneyReturns bll = new B_FIM_MoneyReturns();
        IBLL_CodeGenerate bll2 = new B_CodeGenerate();
        
        [WebMethod]
        public string GenerateNextMoneyReturnsRefNo(string strBgmSourceNo)
        {
            return bll2.GetNextCode(TransectionType.FimMoneyReturnsRefNo, strBgmSourceNo);
        }

        [WebMethod]
        public List<M_FIM_MoneyReturns> GetFull(string bgm_source_seq
            , string bgm_year, string work_area_seq
            , string contact_person_seq, string emp_seq, Nullable<int> money_req_seq, bool bIsFinance)
        {
            return (List<M_FIM_MoneyReturns>)bll.GetFull(bgm_source_seq
            , bgm_year, work_area_seq
            , contact_person_seq, emp_seq, money_req_seq, bIsFinance);
        }

        [WebMethod]
        public List<M_FIM_MoneyReturns> GetList(string bgm_source_seq
            , string bgm_year, string work_area_seq
            , string contact_person_seq, string emp_seq, string filter)
        {
            return (List<M_FIM_MoneyReturns>)bll.GetList(bgm_source_seq
            , bgm_year, work_area_seq
            , contact_person_seq, emp_seq, filter);
        }

        [WebMethod]
        public M_FIM_MoneyReturns GetInfo(string seq)
        {
            return bll.GetInfo(seq);
        }

        //[WebMethod]
        //public string SelectRecentInsertedRoleSeq()
        //{
        //    return bll.SelectRecentInsertedRoleSeq();
        //}

        [WebMethod]
        public string Insert(M_FIM_MoneyReturns info)
        {
            return bll.Insert(info);
        }

        [WebMethod]
        public void Update(M_FIM_MoneyReturns info)
        {
            bll.Update(info);
        }

        [WebMethod]
        public void Delete(M_FIM_MoneyReturns info)
        {
            bll.Delete(info);
        }

        [WebMethod]
        public void ChangeStatus(string return_seq, string record_status, string emp_seq)
        {
            bll.ChangeStatus(return_seq, record_status, emp_seq);
        }

        [WebMethod]
        public void UpdateGlTranSeq(M_FIM_MoneyReturns info)
        {
            bll.UpdateGlTranSeq(info);
        }
    }
}
